import type { RouteRecordRaw } from 'vue-router';

import { $t } from '#/locales';

const routes: RouteRecordRaw[] = [
  {
    meta: {
      icon: 'ic:baseline-view-in-ar',
      // keepAlive: true,
      order: 2,
      title: $t('page.dashboard.foodView'),
    },
    name: 'food',
    path: '/food',
    children: [
      {
        name: 'sizetag',
        path: '/sizetag',
        component: () => import('#/views/food/foodTag.vue'),
        meta: {
          title: '食物标签',
        },
      },
      {
        name: 'sizeClass',
        path: '/sizeClass',
        component: () => import('#/views/food/sizeClass.vue'),
        meta: {
          title: $t('page.dashboard.sizeClass'),
        },
      },
      {
        name: 'foodClass',
        path: '/foodClass',
        component: () => import('#/views/food/foodClass.vue'),
        meta: {
          title: $t('page.dashboard.foodClass'),
        },
      },
      {
        name: 'foodView',
        path: '/foodView',
        component: () => import('#/views/food/foodView/index.vue'),
        meta: {
          title: $t('page.dashboard.foodView'),
        },
      },
    ],
  },
];

export default routes;
